<%--
  Created by IntelliJ IDEA.
  User: 12700
  Date: 2025/9/2
  Time: 0:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>忘记密码</title>
    <link rel="stylesheet" href="../../css/login.css">
    <script type="text/javascript" src="../../js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("[value='查询']").click(function () {
                var username=$("#username").val();
                $.get("../../login/forgetPassword",{"username":username},function (b) {
                    JSON.stringify(b);
                    if(b!="null"){
                        $("#password2").empty();
                        $("<input type=text value='"+(b)+"' disabled>").appendTo("#password2");
                    }else{
                        alert("查询失败,用户名不存在!");
                        $("#password2").empty();
                    };
                });
            });
        });
    </script>
</head>
<body>
<div class="label">
    <div class="box">
        <div class="box-left">
            <div><img src="../../images/rest.jpeg" alt=""></div>
        </div>
        <div class="box-right">
            <table>
                <tr>
                    <h2>查询密码</h2>
                </tr>
                <tr>
                    <p>账户:</p>
                    <input type="text" id="username"> <br>
                    <p>密码:</p>
                    <div id="password2">
                        <input type="text" disabled>
                    </div>
                    <br>
                    <input type="button" value="查询"><br>
                    <div>
                        <a href="../../index.jsp">返回登录页</a>
                    </div>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>
</html>
